/**
 * @Author: 焦质晔
 * @Date: 2019/6/20
 * @Last Modified by: mikey.zhaopeng
 * @Last Modified time: 2019-11-12 13:59:15
 */
import axios from '@/api/fetch';
import SERVER from './server';

// 获取菜单
export const getNavList = () => axios.get(`${SERVER.DMSCLOUD_BASEDATA}/login/getMenus`);
// export const getNavList = () => axios.get(`http://mock.zhoujie16.cn/mock/5d71f4dd6dd18c88f8431c27/dms_vue/getMenus`);

// 获取所有数据字典值
export const getAllDict = () => axios.get(`${SERVER.DMSCLOUD_BASEDATA}/dicts`);
//添加收藏导航
export const postPoint = params => axios.put(`${SERVER.DMSCLOUD_BASEDATA}/favorite/point`, params);

// 获取收藏导航
// export const getStarMenuList = params => axios.get('/api/test', { params });
export const getStarMenuList = params => axios.get(`${SERVER.DMSCLOUD_BASEDATA}/login/getFavoriteMenus`);
// 获取常用导航
export const getCommonMenuList = params => axios.get('/api/test', { params });

// 获取用户的按钮菜单权限
export const getUserPermissionAction = () => axios.get(`${SERVER.SYSMANAGE}/basedata/users/getUserPermissionAction`);

//  查询销售顾问/网销顾问
export const queryEmployees = params => axios.get(`${SERVER.CYXDMS_CLUE}/clue/employeeList`, { params });

//  查询销售顾问/网销顾问
export const queryConsultant = params => axios.get(`${SERVER.CYXDMS_CLUE}/clueaudit/queryConsultant`, { params });

// 预约时间
export const getRemainingAppointments = params => axios.get(`${SERVER.DMSCLOUD_REPAIR}/precontractStatus/getRemainingAppointments`, { params });

//获取售后相关信息
export const getUserPermissionCtrl = () => axios.get(`${SERVER.DMSCLOUD_BASEDATA}/basedata/users/getUserPermissionCtrl`);

// 获取操作记录
export const getflowList = params => axios.get(`/api/canal/flow/list`, { params });
// 查询所有员工
export const getDealerUser = params => axios.get(`${SERVER.DMSCLOUD_BASEDATA}/basedata/users/getDealerUser`);

//获取店端所有数据字典值
export const getDlrAllDict = () => axios.get(`${SERVER.midEndDictCenter}/dict/dictCode/list`);
